<template>
  <div class="block">
    <!-- <span class="demonstration">{{ title }}</span> -->
    <el-pagination
      class="pagination"
      :current-page="currentPage"
      :pager-count="pagercount"
      :page-sizes="pagesizes"
      :page-size="pagesize"
      :prev-text="prevtext"
      :next-text="nexttext"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
      :hide-on-single-page="hideonsinglepage"
      :disabled="disabled"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>
export default {
  name: "Paging",
  props: {
    title: {
      type: String,
      default: "123"
    },
    pagesizes: {
      type: Array,
      default: function() {
        return [10, 20, 30, 40, 50, 100]
      }
    },
    pagercount: {
      type: Number,
      default: 7
    },
    pagesize: {
      type: Number,
      default: 10
    },
    total: {
      type: Number,
      default: 100
    },
    prevtext: {
      type: String,
      default: ""
    },
    nexttext: {
      type: String,
      default: ""
    },
    hideonsinglepage: {
      type: Boolean,
      default: false
    },
    disabled: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      currentPage: 1
    }
  },
  methods: {
    handleSizeChange(val) {
      
    },
    handleCurrentChange(val) {
      
    }
  }
}
</script>

<style lang="scss" scoped>
.block {
  width: 100%;
  height: 50px;
  margin: auto 0px;
  padding: auto 0px;
  background-color: #5697f1;
  // text-align: center;
  // display: flex;
  // justify-content: space-between;
  //分页器样式
  .pagination {
    text-align: right;
    height: 50px;
    padding: 12px 20px;
    // font-size: 28px;
  }
    ::v-deep .pagination .el-pagination__sizes {
      float: left;
    }
    ::v-deep .pagination .el-pagination__total {
      float: left;
      color: #ffffff; //共1000条，total
    }
    ::v-deep .pagination .el-pagination__jump {
      color: #ffffff; //前往（）页
    }
    ::v-deep .el-input__inner {
      background-color: #5697f1; //分页条数选择背景，前往（）页jump背景
      border: 1px solid #5697f1; //边框
      color: #ffffff; //文字颜色
    }
    ::v-deep .btn-prev {
      //上一页按钮
      background-color: #5697f1;
      color: #ffffff;
      // font-size: 14px;
    }
    ::v-deep .btn-next {
      //下一页按钮
      background-color: #5697f1;
      color: #ffffff;
      // font-size: 14px;
    }
    ::v-deep .el-pager li {
      //按钮列表
      background-color: rgba(255, 255, 255, 0);
      color: #fff;
    }
    ::v-deep .el-pager li:hover {
      //按钮列表 hover
      background-color: rgb(255, 255, 255);
      color: #000000;
    }
    ::v-deep .el-pager li:not(.disabled).active {
      //按钮列表 active
      background-color: #000000;
      color: #fff;
    }
}
</style>
